Trò chơi đua xe động vật trong UNITY Engine
114.743 lượt xem;
1 using UnityEngine;
2 using System.Collections;
3
4 public class Resolution : MonoBehaviour {
5 public void Start () {
6 GetComponent<Camera>().aspect = 800f / 480f;
7 Screen.SetResolution(800, 480, true);
8 Screen.sleepTimeout = SleepTimeout.NeverSleep;
9 Screen.orientation = ScreenOrientation.AutoRotation;
10 Screen.autorotateToLandscapeLeft = true;
11 Screen.autorotateToLandscapeRight = true;
12 }
13 }
2 using System.Collections;
3
4 public class Resolution : MonoBehaviour {
5 public void Start () {
6 GetComponent<Camera>().aspect = 800f / 480f;
7 Screen.SetResolution(800, 480, true);
8 Screen.sleepTimeout = SleepTimeout.NeverSleep;
9 Screen.orientation = ScreenOrientation.AutoRotation;
10 Screen.autorotateToLandscapeLeft = true;
11 Screen.autorotateToLandscapeRight = true;
12 }
13 }